//引入vuerouter构造函数创建实例
import VueRouter from "vue-router"
import index from '@/pages/'
import home from '@/pages/home.vue'
import login from '@/pages/login'

export default new VueRouter({
    routes:[
        {
            path:'/',
            name:'home',
            component:index,
            children:[{
                path:'/',
                component:home
            }]
            //使用vuex动态注册路由
        },
        {
            path:'/login',
            name:'login',
            component:login
        },
        
    ]
})